<?php

/*
 * Camelot PHP Tools
 *
 * @version 2.0
 * @author Bendsoft
 * @package PHP Tools
 * @subpackage Camelot
 * @license FreeBSD License (www.bendsoft.com/licensing/)
 *
 */

/**
 * Class holding all possible sessions related to the SharePointDocLibHelper class
 * 
 * @author Bendsoft
 */
class SharePointDocLibHelperSessions {

//    public $doclib;
//    public $documentLibrary;

    public $session;
    //public $forceRenewCache; //opt

    public function __construct() {
        //$this->session = JFactory::getSession();
        //$this->session = $_SESSION;
    }

    public function SetDocLib($doclib) {
        $doclib = serialize($doclib);
        $_SESSION['doclib'] = $doclib;
        //$this->session->doclib = $doclib;
    }
    
    public function GetDocLib() {
        if(isset ($_SESSION['doclib']))
            return unserialize($_SESSION['doclib']);
        return null;
    }

    public function SetDocumentLibrary($documentLibrary) {
        $_SESSION['documentLibrary'] = $documentLibrary;
        //$this->session->documentLibrary = $documentLibrary;
    }
    
    public function GetDocumentLibrary() {
        if(isset ($_SESSION['documentLibrary']))
            return $_SESSION['documentLibrary'];
        return null;
    }
    
    public function ClearDocLib() {
        $_SESSION['doclib'] = null;
        unset ($_SESSION['doclib']);
    }
    
    public function ClearDocumentLibrary() {
        $_SESSION['documentLibrary'] = null;
        unset($_SESSION['documentLibrary']);
    }
}

?>
